﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Routing;

namespace Share.Bonnet.Pager {
    public static class RouteValueDictionaryExtentions {

        /// <summary>
        /// Merge two RouteValueDictionaries
        /// </summary>
        /// <param name="Base"></param>
        /// <param name="Addition"></param>
        /// <returns></returns>
        public static RouteValueDictionary Merge(this RouteValueDictionary Base, RouteValueDictionary Addition) {
            Addition.ToList().ForEach(
                e => Base[e.Key] = e.Value);

            return Base;
        }
    }
}
